#include <cstdio>
#include <cstring>
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int main()
{
	int r,b;
	cin>>r>>b;
	cout<<min(r,b)<<" "<<abs(r-b)/2<<endl;
} 
